#pragma once

#include "View.h"

namespace mscene
{
	class Camera;
	class Node;
}

namespace mgfx
{
	class RenderingSystem;
	class MeshInstance;
	class PointLight;
	class SpotLight;
}

namespace mphys
{
	class PhysicsSystem;
}

namespace mgui
{
	struct EventArgs;
}

namespace medit
{
	class RenderSettingsGui;
}

class GameScene;	

class BrickGameView : public mcore::View
{
public:
	BrickGameView();
	virtual ~BrickGameView();

	void loadSceneFromFile(const std::string & file);
	void saveSceneToFile(const std::string & file);


	void startGame();
	void endGame();

	virtual void unload();
	virtual void onResize() {}
	virtual void update(float dt);
	virtual void draw();

	virtual bool onWindowMessage(UINT msg, WPARAM wParam, LPARAM lParam);

	mgfx::RenderingSystem * mRenderSystem;
	mphys::PhysicsSystem * mPhysicsSystem;

private:
	void initGui();

	void receiveButtonChange(const mgui::EventArgs * args);

	float mTotalTime;

	mscene::Camera * mCamera;

	medit::RenderSettingsGui * mRenderSettingsGui;
};